package hello04.service;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;

@Slf4j
@Service
public class TUserService {

    @Autowired
    private HttpServletRequest request;

    public Long getCurrentUserId() {
        return Long.parseLong(request.getHeader("userId"));
    }

}
